Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: Agent Keeps running & running....! Any ideas why pls?
~Umberto Nongeroson 19.Jan.04 12:29 PM a Web browser
Notes Client 6.0.3 Windows 2000


The agent trigger "After new mail arrives" is precisely that: a trigger. Your code still needs to say what you want the Notes server to do. I assume you mean that for each new mail that arrives, your code should do something to that mail. Fine. But it also needs to set the document as having been processed once the work's done so that it doesn't get processed again. If you're using Lotusscript, then read the Domino Designer help on the NotesDatabase property "UnprocessedDocuments" as this can tell you more. For example:

Using UpdateProcessedDoc

For agents that run on new and modified documents, newly received mail documents, pasted documents, or newly modified documents, you must use the UpdateProcessedDoc method in NotesSession to mark each document as "processed," which ensures that a document gets processed by the agent only once (unless it's modified, mailed, or pasted again). If you do not call this method for each document, the agent processes the same documents the next time it runs.


So, if your code does something like this:

    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim dc As NotesDocumentCollection

    Set dc = db.UnprocessedDocuments
    Set doc = dc.GetFirstDocument

    While Not(doc Is Nothing)
        ...

... before you move on to the next document at the end of the loop, you need to do something like this:

    Call session.UpdateProcessedDoc(doc)

Hope that helps
--
http://www.benpoole.com





Agent Keeps running & running....! ... (~Mark Nimnuplop... 19.Jan.04)
. . RE: Agent Keeps running & running..... (~Delores Dwonic... 19.Jan.04)
. . . . RE: Agent Keeps running & running..... (~Mark Nimnuplop... 19.Jan.04)
. . . . . . RE: Agent Keeps running & running..... (~Delores Dwonic... 19.Jan.04)
. . . . . . . . RE: Agent Keeps running & running..... (~Mark Nimnuplop... 19.Jan.04)
. . . . . . . . . . RE: Agent Keeps running & running..... (~Mark Nimnuplop... 19.Jan.04)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS